#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "ads1299_driver.h"

static const char *TAG = "in_main";

uint8_t id = 0;
uint32_t counter = 0;
uint32_t counter_old = 0;

void ads1299_drv_callback(uint8_t * p_data, uint16_t len){
    counter++;
}

ads1299_drv_t m_ads1299_drv;
void app_main(void)
{

    m_ads1299_drv.callback_handler = ads1299_drv_callback;
    ads1299_dev_init(m_ads1299_drv);
    ads1299_drv_check_id();

    while (1)
    {
        vTaskDelay(1000 / portTICK_PERIOD_MS);
        counter++;
        uint32_t dif = (counter - counter_old);

        ESP_LOGI(TAG, "   %ld ", dif);
        counter_old = counter;

    }



}
